﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using SWDataDB.Models;
using SWDataDB.BLL;
using SWDataDB.DAL;
using System.Data;
 



public partial class Admin_add_addYP : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {

    }



    protected void submit_Click(object sender, EventArgs e)
    {
        YP_INFO_TBL ypobj = new YP_INFO_TBL();
        YPInfo kc_in = new YPInfo();

        ypobj.O_YP_CODE = Request.Form["YP_CODE"];
        ypobj.O_YP_NAME = Request.Form["YP_NAME"];

        ypobj.O_PM_PATH_NAME = Request.Form["PM_PATH_NAME"];
        ypobj.O_PM_PATH_NUM = Request.Form["PM_PATH_NUM"];

        ypobj.O_GEO_ATT_NUM = this.GEO_ATT_NUM.InnerText;

        ypobj.O_YP_LAT = int.Parse((Request.Form["YP_LAT_D"] + Request.Form["YP_LAT_F"] + Request.Form["YP_LAT_M"]));
        ypobj.O_YP_LON = int.Parse((Request.Form["YP_LON_D"] + Request.Form["YP_LON_F"] + Request.Form["YP_LON_M"]));


        ypobj.O_YP_STYLE = Request.Form["YP_STYLE"];





        ypobj.O_STYLE_CODE = Request.Form["STYLE_CODE"];

        ypobj.O_BP_ID = Request.Form["BP_ID"];
        ypobj.O_OUT_NAME = Request.Form["OUT_NAME"];

        //yxobj.O_IMAGE = float.Parse((Request.Form["IMAGE"];

        ypobj.O_INNAR_NAME = Request.Form["INNAR_NAME"];
        ypobj.O_REMARK = this.REMARK.InnerText;

        ypobj.O_CY_POS = Request.Form["CY_POS"];
        ypobj.O_CY_LEVEL = Request.Form["CY_LEVEL"];
        ypobj.O_CJ_PEOPLE = Request.Form["CJ_PEOPLE"];
        ypobj.O_CJ_DATE = Request.Form["CJ_DATE"];

        ypobj.O_ZL_FILE_ID = Request.Form["ZL_FILE_ID"];

         





        if (kc_in.AddYPInfo(ypobj) == 1)
        {
            //bind();
            Response.Write("<script language=javascript>alert('更新成功！');location='../Manage/YPManage.aspx'</script>");
            //Response.Redirect("ZLManage.aspx");
        }
        else
        {
            Response.Write("<script language=javascript>alert('更新失败！');location='../Manage/YPManage.aspx'</script>");
        }
    }


}